<li class="row-post">
    <div class="pro-left">
        <a href="<?php echo $data->getFrontendUrl() ?>"><img src="<?php echo $data->getImageUrl('thumb') ?>"></a>
        <h3><?php echo h($data->title) ?> (<?php echo date('d M Y', $data->updated) ?>)</h3>
        <p class="word-break">
	    <?php echo h($data->content, 220) ?>	
	    <br>
	    <strong>Post type:</strong> <?php
	    switch ($data->type) {
		case Ad::TYPE_EQUIPMENT:
		    echo "Equipment";
		    break;
		case Ad::TYPE_RESUME:
		    echo "Resume";
		    break;
		case Ad::TYPE_JOB:
		    echo "Job";
		    break;
		case Ad::TYPE_SUPPLY:
		    echo "Supply";
		    break;
		case Ad::TYPE_VENDOR:
		    echo "Vendor";
		    break;
		case Ad::TYPE_TECHNICAL:
		    echo "Technical Sevices";
		    break;
		case Ad::TYPE_ADVERTISE: default :
		    echo "Advertise";
		    break;
	    }
	    ?>
            <br /><strong>Categories:</strong> <?php echo $data->mainCategory->name; ?>, <?php /* <a href="<?php echo $data->getTypeUrl() ?>"><?php echo h($data->getType()) ?></a> */ ?>
	    <?php
	    foreach ($data->categories as $cat) {
		echo $cat->name . ', ';
	    }
	    ?>
	    <?php
	    if ($data->expire_time < time()) {//if post ads is expired	    
		?>
    	    <br/>
    	    <strong class="text-error">Post ads is expired. </strong>

		<?php
	    }
	    if ($data->featured && $data->expire_featured < time()) {
		?>
    	    <br/>
    	    <strong class="text-error">Featured ads is expired. </strong>
	    <?php } ?>

        </p>


    </div>
    <div class="pro-right">
        <p><?php echo ($data->contact_state != '' ? $data->contact_state . ', ' : '') . $data->contact_country ?></p>
        <a class="btn btn-my-post" href="<?php echo SITE_NAME_URL ?>user/my_post/edit/id/<?php echo $data->ad_id ?>">Edit</a>	
	<br><br>

	<a class="delete-ads btn btn-warning btn-my-post" ad-id="<?php echo $data->ad_id ?>">Delete</a>

    </div>
</li>